<?php
/* @var $this SoldierController */
/* @var $model Soldier */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'soldier-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'serial_no'); ?>
		<?php echo $form->textField($model,'serial_no'); ?>
		<?php echo $form->error($model,'serial_no'); ?>
	</div>

	
		<div class="row">
		<?php echo $form->labelEx($model,'branch_of_services'); ?>
		<?php echo $form->dropDownList($model, 'branch_of_services', $model->Getbranch_of_services(),
		array('prompt' => 'branch of services')
		); ?>
		<?php echo $form->error($model,'branch_of_services'); ?>
	</div>
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'soldier_name'); ?>
		<?php echo $form->textField($model,'soldier_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'soldier_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'soldier_l_name'); ?>
		<?php echo $form->textField($model,'soldier_l_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'soldier_l_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'soldier_m_name'); ?>
		<?php echo $form->textField($model,'soldier_m_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'soldier_m_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'rank'); ?>
		<?php echo $form->textField($model,'rank',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'rank'); ?>
	</div>
	
	<div class="row">
		<?php echo CHtml::activeLabelEx($model,'birthday'); ?>
		<?php echo CHtml::activeTextField($model,'birthday',array("id"=>"a_date")); ?>
		<?php echo CHtml::image("images/cal.jpg","calendar",
		array("id"=>"a_button","class"=>"pointer")); ?>
		&nbsp;(Click this)
		<?php $this->widget('application.extensions.calendar.SCalendar',
        array(
        'inputField'=>'a_date',
        'button'=>'a_button',
        'ifFormat'=>'%Y-%m-%d',
    ));
    ?>
		<?php echo $form->error($model,'birthday'); ?>
	</div>




	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->